home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1999 #2 / Amiga Plus CD - 1999 - No. 2.iso / Anwender / Grafik / PPT / Install < prev    next >
Text File  |  1998-09-20  |  7KB  |  285 lines

  1. ;
  2. ;  PPT Installer script
  3. ;
  4. ;  $Revision: 1.7 $
  5. ;      $Date: 1998/09/20 21:33:40 $
  6. ;
  7.  
  8. (welcome "This is the PPT Installation utility."
  9.          "Thank you for choosing to test PPT.")
  10.  
  11. ;
  12. ;  Set defaults
  13. ;
  14.  
  15. (set ##installdir "Work:")
  16.  
  17. ; Processor
  18.  
  19. (set ##use020 (not (patmatch "68000|68010" (database "cpu"))))
  20.  
  21. ; FPU
  22.  
  23. (set ##use881 (not (patmatch "688|68040|68060" (database "cpu"))))
  24.  
  25. ; If user-level is expert, ask which versions to install.
  26.  
  27. (if (= @user-level 2)
  28.     (set ##use020
  29.          (askbool
  30.           (prompt "\n"
  31.                   "Do you wish to use the 68020+ optimized\n"
  32.                   "versions of the BGUI library and PPT?")
  33.           (help   (cat "It might be a good idea to install the version "
  34.                        "that best suits your Amiga's processor." ))
  35.           (default ##use020)
  36.           )
  37.          )
  38.   )
  39.  
  40. (debug "Use020 : " ##use020)
  41. (debug "Use881 : " ##use881)
  42.  
  43. ;
  44. ;  Ask the directory to be installed in
  45. ;
  46.  
  47. (set ##installdir
  48.     (askdir
  49.         (prompt "Choose the directory you wish to install\n"
  50.                 "PPT in.  A directory called 'PPT' will be\n"
  51.                 "created for you in this directory"
  52.         )
  53.         (help   (cat "Choose the top directory for PPT.  Installer will "
  54.                      "then create a directory called 'PPT' in the directory "
  55.                      "you chose and copy all of the PPT software in that "
  56.                      "directory.\n\n"
  57.                      @askdir-help) )
  58.         (default ##installdir)
  59.     )
  60. )
  61.  
  62. (debug "You chose" ##installdir)
  63.  
  64. ;
  65. ;   Tack on the dir name
  66. ;
  67.  
  68. (set @default-dest (tackon ##installdir "PPT"))
  69. (debug "You chose" @default-dest)
  70.  
  71. ;
  72. ;   Remove old modules
  73. ;
  74.  
  75. (complete 20)
  76.  
  77. (if (exists @default-dest)
  78.     (delete
  79.         (tackon @default-dest "modules/#?")
  80.         (prompt "Deleting previous installation")
  81.         (help   "Since PPT modules can change between releases, "
  82.                 "for now the previous installation must be deleted "
  83.                 "before the new one is installed.")
  84.         (confirm)
  85.         (all)
  86.     )
  87.     (debug "No previous installation")
  88. )
  89.  
  90. ;
  91. ;   Copy main executables
  92. ;
  93.  
  94. (complete 30)
  95.  
  96. (copyfiles
  97.     (prompt "Installing PPT executable")
  98.     (source (if (= ##use020 1) "ppt020" "ppt" ) )
  99.     (dest @default-dest)
  100.     (newname "ppt")
  101.     (help @copyfiles-help)
  102. )
  103.  
  104.  
  105. ;; Copy docs
  106.  
  107. (complete 40)
  108.  
  109. (copyfiles
  110.     (prompt "Installing documents")
  111.     (source "Docs")
  112.     (dest (tackon @default-dest "Docs") )
  113.     (help (cat "Choose which document files you want to install. "
  114.                "I really recommend you install them all.\n\n"
  115.                @copyfiles-help) )
  116.     (all)
  117.     (infos)
  118.     (confirm)
  119. )
  120.  
  121. ;; Copying image files
  122.  
  123. (complete 45)
  124.  
  125. (copyfiles
  126.     (prompt "Installing image files")
  127.     (source "Images")
  128.     (dest (tackon @default-dest "Images") )
  129.     (help (cat "Choose which images you wish to install. "
  130.                "You don't have to install them, if you don't want to.\n\n"
  131.                @copyfiles-help) )
  132.     (all)
  133.     (infos)
  134.     (confirm)
  135. )
  136.  
  137.  
  138. (complete 50)
  139.  
  140. (copyfiles
  141.     (prompt "Installing miscallaneous stuff")
  142.     (source "")
  143.     (choices "README" "HISTORY" "ReleaseNotes" "ppt.asc" "ModuleInfo")
  144.     (dest @default-dest)
  145.     (help (cat "Choose which additional files you wish to install. "
  146.                "Again, I recommend you to install these all, as these "
  147.                "contain the release notes and the ModuleInfo utility.\n\n"
  148.                @copyfiles-help) )
  149.     (infos)
  150.     (confirm)
  151. )
  152.  
  153. (complete 60)
  154.  
  155. (copyfiles
  156.     (prompt "Installing REXX scripts")
  157.     (source "rexx")
  158.     (dest (tackon @default-dest "rexx") )
  159.     (help (cat "Here you can choose not to install all of the REXX scripts. "
  160.                "I really recommend that you install them all.\n\n"
  161.                @copyfiles-help) )
  162.     (all)
  163.     (infos)
  164.     (confirm)
  165. )
  166.  
  167.  
  168. ;; PPT libraries
  169.  
  170. (complete 70)
  171.  
  172. (copyfiles
  173.     (prompt "Installing PPT external modules")
  174.     (source "modules")
  175.     (dest   (tackon @default-dest "modules") )
  176.     (help   (cat "Choose which external modules you'd like to install. "
  177.                  "If you wish to save space, you can remove those modules "
  178.                  "you think you're not going to need, such as the modules "
  179.                  "which have not been compiled for your processor.  However, "
  180.                  "PPT can figure out which processor your machine has and "
  181.                  "determine, which module is the best for you.  So you don't "
  182.                  "really need to remove any of these modules.\n\n"
  183.                  @copyfiles-help) )
  184.     (confirm)
  185.     (all)
  186. )
  187.  
  188. ;(copyfiles
  189. ;    (prompt "Copying PPT executables & modules")
  190. ;    (source "")
  191. ;    (dest @default-dest)
  192. ;    (pattern "~(libs)")
  193. ;    (help   @copyfiles-help)
  194. ;)
  195.  
  196. (copyfiles
  197.     (prompt "Installing icons")
  198.     (source "")
  199.     (pattern "(PPT|README|Docs|ReleaseNotes|rexx|Images).info")
  200.     (dest   @default-dest)
  201.     (help   @copyfiles-help)
  202.     (infos)
  203. )
  204.  
  205. (copyfiles
  206.     (prompt "Installing drawer icon")
  207.     (source "/PPT.info")
  208.     (dest   (tackon @default-dest "/"))
  209.     (help   @copyfiles-help)
  210.     (infos)
  211. )
  212.  
  213.  
  214. ;
  215. ;   Install libraries
  216. ;
  217.  
  218. (complete 80)
  219.  
  220. (copylib
  221.     (prompt "Copying BGUI library")
  222.     (confirm)
  223.     (source (if (= ##cpu020 1) ("libs/bgui.library_e") ("libs/bgui.library")))
  224.     (dest   "libs:")
  225.     (newname "bgui.library")
  226.     (help   @copylib-help)
  227. )
  228.  
  229. (copylib
  230.     (prompt "Copying BGUI floating point gadget")
  231.     (confirm)
  232.     (source "libs/bgui_float.gadget")
  233.     (dest   "SYS:Classes/Gadgets")
  234.     (help   @copylib-help)
  235. )
  236.  
  237. (copylib
  238.     (prompt "Copying BGUI palette gadget")
  239.     (confirm)
  240.     (source "libs/bgui_palette.gadget")
  241.     (dest   "SYS:Classes/Gadgets")
  242.     (help   @copylib-help)
  243. )
  244.  
  245. ;
  246. ;   Make assigns
  247. ;
  248.  
  249. (complete 90)
  250.  
  251. (set ##jpegdir
  252.     (askdir
  253.         (prompt "You must now choose a place for any "
  254.                 "temporary JPEG files to be put in. "
  255.                 "(See Help for more info)"
  256.         )
  257.         (help   "The JPEG loader needs a JPEGTMP: assign "
  258.                 "in order to handle really large progressive "
  259.                 "or multi-scan files.  If you already happen "
  260.                 "to have this assign, just say 'Skip This Phase'. "
  261.                 "If not, then you should pick up a hard drive "
  262.                 "directory with plenty of space."
  263.         )
  264.         (default ##installdir)
  265.     )
  266. )
  267.  
  268. (makeassign "JPEGTMP" ##jpegdir)
  269.  
  270. (set ##jpegassign ("Assign >NIL: JPEGTMP: %s" ##jpegdir))
  271.  
  272. (startup "PPT JPEG loader"
  273.     (prompt ( "\nI shall now add the following line\nto your S:User-Startup:\n\n%s"
  274.                ##jpegassign)
  275.             )
  276.     (command ##jpegassign )
  277.     (help @startup-help)
  278. )
  279.  
  280. ;
  281. ;   The END.
  282. ;
  283. (complete 100)
  284.  
  285.